home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / ARCADE.ZIP / MS.EXE / lzh / DRIVER.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  302 b   |  23 lines

  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. main()
  5. {
  6.     unsigned buttons=0;
  7.     int x=0,y=0;
  8.  
  9.  
  10.     init_joystick();
  11.     clrscr();
  12.  
  13.     for(;;)
  14.     {
  15.         buttons=poll_buttons();
  16.         gotoxy(1,1);
  17.         printf("Buttons: %x\n",buttons);
  18.         poll_joystick(&x,&y);
  19.         printf("Joystick: (%d,%d)",x,y);
  20.     }
  21.     return(0);
  22. }
  23.